package com.itheima.design.mode.decorator;


/**
 * 装饰者模式
 */
public class Main {

    public static void main(String[] args) {

        Car car = new Car();
        car.move();

        FlyCar flyCar = new FlyCar(car);
        flyCar.fly();

        WaterCar waterCar = new WaterCar(car);
        waterCar.water();

    }
}
